package com.choosefine.it.basedata.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

import com.choosefine.it.base.Base;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 班组类型
 * 
 * @author guwenwei
 * @date 2016/11/26
 */
@ApiModel(value = "班组类型对象", description = "班组类型基础数据")
public class TeamType extends Base implements Serializable {
	@ApiModelProperty(value = "主键ID", required = true)
	private Integer id;
	@ApiModelProperty(value = "班组类型名", required = true)
	private String name;
	@ApiModelProperty(value = "父类ID", required = true)
	private Integer superid;

	private static final long serialVersionUID = 1L;

	/*
	 * 用于排序
	 * 
	 * add by juchengyang 2017/2/16
	 */
	@JsonIgnore
	private Integer sortNum;
	
	/*
	 * add by juchengyang 2017/2/17
	 */
	@ApiModelProperty(value = "启用状态")
	private Integer isValid;
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name == null ? null : name.trim();
	}

	public Integer getSuperid() {
		return superid;
	}

	public void setSuperid(Integer superid) {
		this.superid = superid;
	}

	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		TeamType other = (TeamType) that;
		return (this.getId() == null ? other.getId() == null : this.getId()
				.equals(other.getId()))
				&& (this.getName() == null ? other.getName() == null
						: this.getName().equals(other.getName()))
				&& (this.getSuperid() == null ? other.getSuperid() == null
						: this.getSuperid().equals(other.getSuperid()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
		result = prime * result
				+ ((getName() == null) ? 0 : getName().hashCode());
		result = prime * result
				+ ((getSuperid() == null) ? 0 : getSuperid().hashCode());
		return result;
	}

	@Override
	public String toString() {
		return "TeamType [id=" + id + ", name=" + name + ", superid="
				+ superid + "]";
	}

	public Integer getSortNum() {
		return sortNum;
	}

	public void setSortNum(Integer sortNum) {
		this.sortNum = sortNum;
	}

	public Integer getIsValid() {
		return isValid;
	}

	public void setIsValid(Integer isValid) {
		this.isValid = isValid;
	}

}